import type { InjectionKey } from "vue";
import type { DropdownMenuProps, DropdownMenuItemProps } from "../config";

export interface DropdownMenuContext {
	props: Required<DropdownMenuProps>;
	activeId:string,
	addField(field: DropdownMenuItemContext):void;
	removeField(field: DropdownMenuItemContext):void;
	handleChildToggle(id:string):void
	close():void
}

export interface DropdownMenuItemContext {
	props: Required<DropdownMenuItemProps>;
	active:boolean,
	title:string,
	disabled:boolean,
	id:string
}

export const dropdownMenuItemContextKey: InjectionKey<DropdownMenuItemContext> = Symbol(
	"EDropdownMenuItemContextKey"
);
export const dropdownMenuContextKey: InjectionKey<DropdownMenuContext> =
	Symbol("EDropdownMenuContextKey");
